<?php /* Smarty version 2.6.20, created on 2017-04-12 22:12:37
         compiled from admin_order.htm */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'admin_order.htm', 48, false),array('modifier', 'number_format', 'admin_order.htm', 66, false),)), $this); ?>
<div class="path">
    <div>
    	<a href="main.php?cg_u_type=1">用户中心</a> <span>&gt;</span> 
    	<a href="main.php?m=product&s=admin_buyorder">订单管理</a> <span>&gt;</span> 
        <?php if ($_GET['status'] == '1'): ?>等待付款
        <?php elseif ($_GET['status'] == '2'): ?>等待发货
        <?php elseif ($_GET['status'] == '3'): ?>已经发货
        <?php elseif ($_GET['status'] == '4'): ?>已经完成
        <?php elseif ($_GET['status'] == '5'): ?>等待退货
        <?php elseif ($_GET['status'] == '6'): ?>退货完成
        <?php elseif ($_GET['status'] == '-1'): ?>已经取消
        <?php else: ?>所有订单<?php endif; ?> 
    </div>
</div>
<div class="main">
	<div class="wrap">
        <div class="hd">
            <ul class="tabs">
               <li class="<?php if ($_GET['status'] != ''): ?>normal<?php else: ?>active<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder">所有订单</a></li>
                <li class="<?php if ($_GET['status'] == '1'): ?>active<?php else: ?>normal<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=1">等待付款</a></li>
                <li class="<?php if ($_GET['status'] == '2'): ?>active<?php else: ?>normal<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=2">等待发货</a></li>
                <li class="<?php if ($_GET['status'] == '3'): ?>active<?php else: ?>normal<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=3">已经发货</a></li>
                <li class="<?php if ($_GET['status'] == '4'): ?>active<?php else: ?>normal<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=4">已经完成</a></li>
             <!--   <li class="<?php if ($_GET['status'] == '5'): ?>active<?php else: ?>normal<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=5">等待退货</a></li>
                <li class="<?php if ($_GET['status'] == '6'): ?>active<?php else: ?>normal<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=6">退货完成</a></li>-->
                <li class="<?php if ($_GET['status'] == '0'): ?>active<?php else: ?>normal<?php endif; ?>"><a href="main.php?m=product&s=admin_buyorder&status=0">已经取消</a></li>
            </ul>
        </div>
        <table class="table-list-style order">
        	<thead>
            <tr>
                <th width="10"></th>
                <th width="280">产品详情</th>
                <th width="80">单价</th>
                <th width="80">数量</th>
                <th width="120">订单总价</th>
                <th width="120">状态与操作</th>
            </tr>
            </thead>
            <tbody>
            <?php $_from = $this->_tpl_vars['blist']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['buylist']):
?>
            <tr>
            	<td class="sep-row" colspan="20"></td>
            </tr>
            <tr>
                <th colspan="20">
                <span class="fl ml10">订单编号：<span style="color: #339900; font-family: Tahoma;"><?php echo $this->_tpl_vars['buylist']['order_id']; ?>
</span></span>
                <span class="fl ml20">下单时间：<span style="color: #999999; font-family: Tahoma;"><?php echo ((is_array($_tmp=$this->_tpl_vars['buylist']['create_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M:%S")); ?>
</span></span>
                <span class="fl ml20"><a target="_blank" class="order_show" href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/main.php?m=product&s=admin_orderdetail&id=<?php echo $this->_tpl_vars['buylist']['order_id']; ?>
">查看订单</a></span>
                </th>
			</tr>
            <tr> 
                <td class="bdl"></td>
                <td colspan="3">
                <table>
                <?php $_from = $this->_tpl_vars['buylist']['product']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['plist']):
?>
                <tr>
                    <td class="w80">
                    <div class="pic-small">
                        <a target="_blank" href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/?m=product&s=detail&id=<?php echo $this->_tpl_vars['plist']['product_id']; ?>
">
                            <img width=60 height=60 src="<?php if (! $this->_tpl_vars['plist']['pic']): ?>image/default/nopic.gif<?php else: ?><?php echo $this->_tpl_vars['plist']['pic']; ?>
<?php endif; ?>" alt="<?php echo $this->_tpl_vars['list']['pname']; ?>
" />
                        </a>
                    </div>
                    </td>
                    <td class="tl"><a target="_blank" href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/?m=product&s=detail&id=<?php echo $this->_tpl_vars['plist']['product_id']; ?>
"><?php echo $this->_tpl_vars['plist']['name']; ?>
</a></td>
                    <td class="w80"><?php echo ((is_array($_tmp=$this->_tpl_vars['plist']['price'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</td>
                    <td class="w80"><?php echo $this->_tpl_vars['plist']['num']; ?>
</td>
                </tr>
                <?php endforeach; endif; unset($_from); ?>
                </table>
                </td>
                <td class="bdl">
                	<p class="price"><?php echo ((is_array($_tmp=$this->_tpl_vars['buylist']['cost']+$this->_tpl_vars['buylist']['freight'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</p>
                    <p><?php echo $this->_tpl_vars['buylist']['payment_name']; ?>
</p>
                </td>
                <td class="bdl bdr">
                <!--<?php if ($this->_tpl_vars['buylist']['status'] == 3): ?><p><a class="buttons" href="main.php?m=product&s=admin_return&id=<?php echo $this->_tpl_vars['buylist']['order_id']; ?>
"><?php echo $this->_tpl_vars['lang']['applret']; ?>
</a></p><?php endif; ?>
                <?php if ($this->_tpl_vars['buylist']['status'] == 5): ?> <p><a class="buttons" href="main.php?m=product&s=admin_return_step&id=<?php echo $this->_tpl_vars['buylist']['order_id']; ?>
">退货详情</a></p><?php endif; ?>-->
                <p><?php echo $this->_tpl_vars['buylist']['statu_text']; ?>
</p>
                <p><?php echo $this->_tpl_vars['buylist']['next_action']; ?>
</p>
                <?php if ($this->_tpl_vars['buylist']['status'] == 4 && $this->_tpl_vars['buylist']['is_comment'] == 'false'): ?>
                <p><a href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/?m=product&s=comment&uid=<?php echo $this->_tpl_vars['buid']; ?>
&id=<?php echo $this->_tpl_vars['buylist']['order_id']; ?>
">评论</a></p>
                    <?php elseif ($this->_tpl_vars['buylist']['status'] == 3): ?>
                    <p><a href="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/main.php?m=product&s=admin_buyorder&flag=4&id=<?php echo $this->_tpl_vars['buylist']['order_id']; ?>
" onclick="if(!confirm('确认收货么？')){ return false;} ">确认收货</a></p>
                <?php endif; ?>
                </td>
            </tr>
            <?php endforeach; else: ?>
            <tr>
            	<td colspan="20" class="norecord">
                	<i></i><span>暂无符合条件的数据记录</span>	
                </td>
            </tr>
            <?php endif; unset($_from); ?>
            </tbody>
            <tfoot>
            <tr>
                <td colspan="20"><div class="pagination"><?php echo $this->_tpl_vars['blist']['page']; ?>
</div></td>
            </tr>
            </tfoot>
        </table>
    </div>
</div>